import requests

from likeshop_api_project.api.login_api import login_model
from likeshop_api_project.base.myBase import Tools


class get_order_lists_model(Tools):
    path = '/api/order/lists'

    # 发送查询任务接口
    def get_order_lists_action(self, type, hd):
        get_order_lists_data = {
            "type":type
        }

        get_order_lists = self.huihua.get(url=self.hosturl + self.path, params=get_order_lists_data,headers=hd)

        return get_order_lists.json()





# s = requests.session()
# login = login_model(huihua=s)
# msg = login.login_action(account='17612345678', pwd='admin123', client='4')
# print(msg)
# tokena = msg['data']['token']
# hd = {
#     'token': tokena
# }
# print(hd)
#
# get_order_lists = get_order_lists_model(huihua=s)
# msg = get_order_lists.get_order_lists_action(type='all',hd=hd)
# print(msg)